package com.xyz.rok.tools.mapper;

import com.xyz.rok.tools.model.PlayerStat;
import com.xyz.rok.tools.model.dto.StatDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PlayerStatMapper {
    int deleteByPrimaryKey(Long id);

    int insert(PlayerStat record);

    int insertSelective(PlayerStat record);

    PlayerStat selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PlayerStat record);

    int updateByPrimaryKey(PlayerStat record);

    List<String> getFinishedNames(@Param("serverId") Integer serverId, @Param("day") Integer day);

    PlayerStat selectByServerIdGameIdDay(@Param("serverId") Integer serverId, @Param("gameId") Integer gameId, @Param("day") Integer day);

    List<StatDto> selectStatDto(@Param("serverId") Integer serverId, @Param("day") Integer day, @Param("orderBy") String orderBy);

    List<Integer> getHasDataDay(@Param("serverId") Integer serverId);

    List<StatDto> selectDKPByDay(@Param("serverId") Integer server, @Param("day") Integer day, @Param("t4Kill") Integer t4Kill, @Param("t5Kill") Integer t5Kill, @Param("death") Integer death);

    List<StatDto> selectStatDtoByDay(@Param("serverId") Integer serverId, @Param("day") Integer day, @Param("orderBy") String orderBy);

    List<StatDto> selectStatDownloadByDay(@Param("serverId") Integer serverId, @Param("day") Integer day);
}